{% extends 'BWLwebshopBundle:Admin:base.html.twig' %}

{% block title %}Stückliste{% endblock %}

{% block body %}
    <link href="{{ asset('css/items.css') }}" type="text/css"
          rel="stylesheet"/>

    <h1>Stückliste</h1>
    <h2>{{ productName }}</h2>
    <br/>
    <article class="box">
        <table class="dottedlight">
            <tr>
                <th>Materialkomponente</th>
                <th>Menge</th>
                <th>Dispositionsstufe</th>
            </tr>
            {% for partListEntry in partList %}
                <tr>
                    <td>
                        {% for i in range(1, partListEntry.dispoGrade) %}
                            {% if i > 1 %}
                                &#8 &#8 &#8 &#8
                            {% endif %}
                        {% endfor %}
                        {{ partListEntry.name }}</td>
                    <td>{{ partListEntry.count }}</td>
                    <td>{{ partListEntry.dispoGrade }}</td>
                </tr>
            {% endfor %}
        </table>
    </article>

{% endblock %}